:root {
    --primary-color: #4a90e2;
    --secondary-color: #6c757d;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 0.375rem;
    --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #f5f7fa;
    color: #212529;
    line-height: 1.6;
    padding: 1rem;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}


.header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.header h1 {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--secondary-color);
    font-size: 1rem;
}


.controls-panel {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
    overflow: hidden;
}

.controls-header {
    padding: 1.25rem 1.5rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.controls-header h3 {
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.controls-header p {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
    padding: 1.5rem;
}

.control-group {
    display: flex;
    flex-direction: column;
}

.control-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-size: 0.875rem;
}

.control-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

input[type="color"] {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.125rem;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    cursor: pointer;
}

select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    background-color: white;
    font-size: 0.875rem;
    transition: var(--transition);
}

select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

input[type="range"] {
    flex-grow: 1;
    height: 0.375rem;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: #e9ecef;
    border-radius: 0.25rem;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1rem;
    height: 1rem;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

.controls-footer {
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    text-align: right;
}


.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    color: white;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #3a7bc8;
    border-color: #3672bd;
}

.demo-panel {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.demo-header {
    padding: 1.25rem 1.5rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.demo-header h3 {
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.demo-header p {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

.demo-content {
    padding: 1.5rem;
    text-align: center;
}

.slider-container {
    margin: 1.5rem 0;
}

.slider-track {
    position: relative;
    height: 0.5rem;
    background: #e9ecef;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.slider-progress {
    position: absolute;
    height: 100%;
    background: var(--primary-color);
    border-radius: 0.25rem;
    width: 0%;
    transition: var(--transition);
}


.slider-thumb-dot {
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    background: white;
    border: 0.25rem solid var(--primary-color);
    border-radius: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    left: 0%;
    cursor: grab;
    box-shadow: 0 0.125rem 0.3125rem rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    z-index: 2;
}


.slider-thumb-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
    cursor: grab;
    transition: var(--transition);
    z-index: 2;
}


.arrow-up {
    border-width: 0 0.625rem 1rem 0.625rem;
    border-color: transparent transparent var(--primary-color) transparent;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.arrow-down {
    border-width: 1rem 0.625rem 0 0.625rem;
    border-color: var(--primary-color) transparent transparent transparent;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.arrow-left {
    border-width: 0.625rem 1rem 0.625rem 0;
    border-color: transparent var(--primary-color) transparent transparent;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
}

.arrow-right {
    border-width: 0.625rem 0 0.625rem 1rem;
    border-color: transparent transparent transparent var(--primary-color);
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
}


.slider-thumb-none {
    display: none;
}

.slider-thumb-dot:active,
.slider-thumb-arrow:active {
    cursor: grabbing;
}

.slider-vertical {
    width: 0.5rem;
    height: 12.5rem;
    margin: 0 auto;
}

.slider-vertical .slider-progress {
    width: 100%;
    height: 0%;
    bottom: 0;
}

.slider-vertical .slider-thumb-dot {
    left: 50%;
    top: 0%;
}


.value-display {
    margin-top: 1rem;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .controls-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0;
    }

    .header,
    .controls-panel,
    .demo-panel {
        border-radius: 0;
    }
}